---
id: "function"
keywords: ["function"]
name: "() => {}"
summary: "This is a `function`."
category: "languageconstructs"
---

Functions are declared with arguments in parentheses, an arrow, and a return expression.

### Example

<CodeTab labels={["ReScript", "JS Output"]}>

```res
let greet = (name: string) => {
  "Hello " ++ name
}
```

```js
function greet(name) {
  return "Hello " + name;
}
```

</CodeTab>

### References

- [Function](../docs/manual/function.mdx)
